{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "37c59c02",
   "metadata": {},
   "source": [
    "## 开发环境\n",
    "\n",
    "- Python3.7 + Anaconda 5.3.1\n",
    "- CUDA 10.0\n",
    "- Pycharm"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b969e820",
   "metadata": {},
   "source": [
    "#### Anaconda 官网\n",
    "https://www.anaconda.com/download"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ab133a4d",
   "metadata": {},
   "source": [
    "#### anaconda 命令\n",
    "conda list  显示包列表\n",
    "\n",
    "conda --version 查看anaconda版本\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bd4c13f2",
   "metadata": {},
   "source": [
    "#### 下载CUDA\n",
    "\n",
    "https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e4d5cdbf",
   "metadata": {},
   "source": [
    "查看安装结果\n",
    "mvcc -V\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ea19c21f",
   "metadata": {},
   "source": [
    "#### 安装PyTorch\n",
    "\n",
    "- 配置conda 源\n",
    "\n",
    "conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/\n",
    "\n",
    "conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/\n",
    "\n",
    "- 配置国内源，安装Pytorch\n",
    "\n",
    "conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch\n",
    "\n",
    "- 显示源地址\n",
    "\n",
    "conda config --set show_channel_urls yes\n",
    "\n",
    "- 安装PyTorch（安装PyTorch，必须去掉 -c pytorch 这个参数，就会从anaconda的国内源地址中下载）\n",
    "\n",
    "PyTorch官网：https://pytorch.org 选择后生成如下命令\n",
    "\n",
    "conda install pytorch torchvision cudatoolkit=10.0\n",
    "\n",
    "- 安装PyTorch 后验证"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e82fbf3b",
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "print(torch.__version__)\n",
    "print('gpu: ', torch.cuda.is_available())"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "48da4f85",
   "metadata": {},
   "source": [
    "#### 课程GitHub地址：\n",
    "\n",
    "https://github.com/dragen1860/Deep-Learning-with-PyTorch-Tutorials"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "da594b1c",
   "metadata": {},
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
